package com.zkjl.protect_business.entity;

import com.zkjl.protect_business.entity.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

import java.util.List;

/**
 * 权限实体
 **/
@Data
@ApiModel(value = "Permission对象", description = "权限对象")
@Document(indexName = "pb_permission", shards = 1, replicas = 0)
public class Permission extends BaseEntity {

    @Id
    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "权限名")
    private String name;

    @ApiModelProperty(value = "类型为菜单时，代表前端路由地址，类型为按钮时，代表后端接口地址")
    private String url;

    @ApiModelProperty(value = "权限类型，菜单-1，按钮-2")
    private Integer type;

    @ApiModelProperty(value = "菜单图标")
    private String icon;

    @ApiModelProperty(value = "权限表达式 add edit remove uploadTemplate uploadDocument export")
    private String permission;

    @ApiModelProperty(value = "后端接口访问方式")
    private String method;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "父级id")
    private String parentId;


}
